package structure.flyweight;

/**
 * Created by lie on 2017/11/2.
 */
public class PhoneGoods implements IGoods{

    private String name;//内部状态

    private String version;//外部状态

    public PhoneGoods(String name) {
        this.name = name;
    }

    @Override
    public void showGoodsPriceByVersion(String version) {
        switch (version){
            case "64":
                System.out.println("64G的要5199元");
                break;
            case "128":
                System.out.println("128G的要6199元");
                break;
        }
    }
}
